﻿
@{
    ViewBag.Title = "找回密码";
}
<div class="headertwo clearfloat" id="header">
    <a href="javascript:history.go(-1)" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
    <p class="fl">输入新密码</p>
</div>

<div class="modify clearfloat" id="main">
    <ul>
        <li class="clearfloat">
            <input type="password" name="" id="password" value="" placeholder="请输入新密码" class="sname snametwo" />
        </li>
        <li class="clearfloat">
            <input type="password" name="" id="password2" value="" placeholder="请再次输入新密码" class="sname snametwo" />
        </li>
    </ul>
    <a href="#" id="btnNext" class="pay-btn clearfloat">
        确认修改
    </a>
</div>


@section FooterScript
{
    <script type="text/javascript">
    $(function () {
        $("#btnNext").click(function () {
            var password = $("#password").val();
            var password2 = $("#password2").val();
            if (password != password2)
            {
                alert("两次输入的密码不一致");
                return;
            }
            $.ajax({
                url: "/User/ForgotPassword3", type: "post", dataType: "json",
                data: { password: password },
                success:function(res)
                {
                    if(res.status=="ok")
                    {
                        location.href = "/User/ForgotPassword4";
                    }
                    else
                    {
                        alert(res.errorMsg);
                    }
                },
                error:function()
                {
                    alert("网络错误");
                }

            });
        });
    });
    </script>
}
